package com.ydche.dao.impl;

import com.ydche.client.SimpleClient;
import com.ydche.dao.IUserRoleDao;
import com.ydche.util.MyException;
import com.ydche.idl_output.UserRole;
import org.springframework.stereotype.Service;

@Service
public class UserRoleDaoImpl implements IUserRoleDao {
    @Override
    public int addUserRole(UserRole role) {
        int id = 0;
        try {
            id = SimpleClient.getClient().add_user_role(role);
        } catch (Exception e) {
            MyException.handleThriftException(e);
        }
        return id;
    }
}
